package cn.broadsense.biz.enums;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 查询字段枚举
 *
 * @author: pengxin
 * @create: 2024-04-12 10:04
 * @Version 1.0
 **/
@AllArgsConstructor
@ApiModel("字段枚举")
@NoArgsConstructor
@Data
public class ChannelField {



    /**
     * 数据库字段
     */
    @ApiModelProperty("字段值")
    private String filedNameDb;

    /**
     * 显示字段
     */
    @ApiModelProperty("字段名称")
    private String filedName;


    public static ChannelField fromChannelFieldEnum(ChannelFieldEnum channelField) {
        ChannelField dto = new ChannelField();
        dto.setFiledNameDb(channelField.getFiledNameDb());
        dto.setFiledName(channelField.getFiledName());
        return dto;
    }

}
